package com.sdp.right.entity;

import java.io.Serializable;
import java.time.LocalDateTime;

import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author zsp
 * @since 2023-10-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_role_person")
public class SysRolePerson extends Model<SysRolePerson> {

    private static final long serialVersionUID=1L;

    /**
     * 主键
     */
    @TableId(value="key_id",type=IdType.ASSIGN_ID)
    private String keyId;

    /**
     * 人员账号
     */
    @TableField("account_no")
    private String accountNo;

    /**
     * 角色编号
     */
    @TableField("role_no")
    private String roleNo;

    /**
     * 排序号
     */
    @TableField("role_person_sort")
    private Integer rolePersonSort;

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private LocalDateTime createTime;


    @Override
    protected Serializable pkVal() {
        return this.keyId;
    }

}
